package com.qfjy.controller;

import com.qfjy.serivce.VideoInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

/**
 * @ClassName VideoInfoController
 * @Description TODO
 * @Author guoweixin
 * @Date 2022/4/24
 * @Version 1.0
 */
@Controller
@RequestMapping("videoInfo")
public class VideoInfoController {

    @Autowired
    private VideoInfoService videoInfoService;

    @Value("${server.port}")
    private String port;

    @ResponseBody
    @GetMapping("/get")
    public String selectVideoInfoByPcode(@RequestParam("pcode") String pcode){

        return  videoInfoService.selectVideoInfoByPcode(pcode)+"\t"+port;
    }


    @ResponseBody
    @PostMapping("/insert")
    public String insertVideoInfo(@RequestParam("info") String info){

        return  "添加成功"+info;
    }


}
